ABC129 B - Balance
https://atcoder.jp/contests/abc129/tasks/abc129_b
提出
code: python
n = int(input())
w = list(map(int, input().split()))
ans = float('inf')
for i in range(n):
res = abs(sum(w0:i) - sum(wi:))
if (res < ans):
ans = res
print(ans)